<%
  column_type_dom_id = form.dom_id(field).sub(field.method_name.to_s, field.type_column)
%>

<div class="row">
  <div class="col-sm-3">
    <% field.widget_options_for_types.each do |model, value| %>
      <div data-options="<%= value.to_json %>" id="<%= model %>-js-options"></div>
    <% end %>
    <%=
      form.select field.type_column, field.type_collection, {include_blank: true, selected: field.selected_type},
                  class: "form-select", id: column_type_dom_id, data: { polymorphic: true, urls: field.type_urls.to_json },
                  style: "float: left; margin-right: 10px;"
    %>
  </div>
  <div class="col-sm-4">
    <%=
      form.select field.method_name, field.collection, {include_blank: true, selected: field.selected_id},
                  class: "form-control", data: { filteringselect: true, options: field.widget_options },
                  placeholder: 'Search'
    %>
  </div>
</div>
